package com.superlc.ssm.common.util;


/**
* @author super
* */
public class ResponseUtils<T> {

    public static ResponseEntity success(Object data){
        ResponseEntity resp = new ResponseEntity();
        resp.setCode(1);
        resp.setMsg("SUCCESS");
        resp.setResponse(data);
        return resp;
    }

    public static ResponseEntity failed(Object data){
        ResponseEntity resp = new ResponseEntity();
        resp.setCode(0);
        resp.setMsg("FAILED");
        resp.setResponse(data);
        return resp;
    }

    public static ResponseEntity response(Integer code, String message, Object data){
        ResponseEntity resp = new ResponseEntity();
        resp.setCode(code);
        resp.setMsg(message);
        resp.setResponse(data);
        return resp;
    }



}
